import { defineConfig } from 'vite'
import { fileURLToPath, URL } from 'url'
import react from '@vitejs/plugin-react'
import Unocss from 'unocss/vite'

export default defineConfig(() => {

  let alias = {
    '@': fileURLToPath(new URL('./src', import.meta.url))
  }

  return {
    plugins: [
      react(),
      Unocss()
    ],
    resolve: {
      alias,
      extensions: ['.js', '.jsx', '.json', '.css', '.scss']
    }
  }
})